<?php

namespace App\Http\Requests\Admin;

use Illuminate\Foundation\Http\FormRequest;

class NoticeRequest extends FormRequest
{
    public function rules(): array
    {
        return [
            'title'           => 'required|string|max:100',
            'type'            => 'required|string',
            'level'           => 'required|string',
            'targetType'      => 'required|integer|in:1,2',
            'content'         => 'required|string',
            'targetUserIds'   => 'array|nullable',
            'targetUserIds.*' => 'integer'
        ];
    }
}
